/*******************************************************************************
Login.cpp

	Author:		LiuDingXi
	e-mail:		liudx@gmail.com
	Date time:	2009-08-17

	Copyright (C) 2009
	All rights reserved.
	
*******************************************************************************/
#include "StdAfx.h"
#include "Login.h"
#include "GTileMap.h"
#include "GSprite.h"
#include "GSound.h"

#if (_OS_ == _OS_WINNT_)
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
#endif//(_OS_ == _OS_WINNT_)


CLogin::CLogin()
{
}

CLogin::~CLogin()
{
}


BOOL CLogin::Init(LPCTSTR szFolder, GDC* pDC, GEngine* pEngine)
{
	if(GScene::Init(szFolder, pDC, pEngine))
	{
		GSprite* pSprite = GetSprite(GameBG);
		if(pSprite)
		{
			pSprite->SetPos(0, 0);
			pSprite->SetVisible(TRUE);
			AddHead(pSprite, eSprite);
		}

		m_LoginDlg.Create(this, LoginDlg);
		m_LoginDlg.SetPos(0, 0);
		m_LoginDlg.DoModal(0, 0);
		return TRUE;
	}
	return FALSE;
}

LONG CLogin::Update(UINT nMillisecond)
{
	GScene::Update(nMillisecond);

	// todo: add codes
	return 0;
}
